import {} from 'umi'
import { getProListReq } from '@/service/pro'

const ProManagerModel = {
  namespace: 'pro',
  state: {
    proList: []
  },
  effects: {
    *getProListEffect ({ payload }, { call, put }) {
      const res = yield call(getProListReq, payload)
      console.log(1231257235476473853, res.data)
      yield put({
        type: 'UPDATEPROLIST',
        payload: res.data
      })
    }
  },
  reducers: {
    UPDATEPROLIST (state: any, action: any) {
      console.log('987654321', state)
      state.proList = action.payload
    }
  }
}
export default ProManagerModel
